package com.tansuo365.test1.bean.otherbean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.dozermapper.core.Mapping;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private Integer id;

    @Mapping("username")
    private String yonghumingcheng;

    private String password;

    private String truename;

    private String bumenmingcheng;

    private String gangweijuese;

    private String beizhu;

    private String salt;

    private String root; //是否总管理员,超级权限,不可删除.默认空字符串 如果为 'root' 则不可删除

    @Transient
    private String roles; //展示用户角色
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createtime;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatetime;

    private Integer p_id;

    private Integer state;

    private String icon;

    @Transient
    private String sort;
    @Transient
    private String order;

}